package com.tomshushu.doc.freedoc.modular.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tomshushu.doc.freedoc.modular.project.model.result.ProjectListResult;
import com.tomshushu.doc.freedoc.modular.user.entity.UserEntity;
import com.tomshushu.doc.freedoc.modular.user.model.param.AddUserParam;
import com.tomshushu.doc.freedoc.modular.user.model.param.GetProjectByTeamIdParam;
import com.tomshushu.doc.freedoc.modular.user.model.param.LoginParam;
import com.tomshushu.doc.freedoc.modular.user.model.result.AddUserReault;
import com.tomshushu.doc.freedoc.modular.user.model.result.LoginResult;
import com.tomshushu.doc.freedoc.modular.user.model.result.UserInfoResult;

import java.util.List;

public interface UserService extends IService<UserEntity> {

    /**
     * 添加用户
     *
     * @param params
     * @return
     */
    AddUserReault addUser(AddUserParam params);

    /**
     * 登录
     * @param params
     * @return
     */
    LoginResult login(LoginParam params);

    /**
     * 登出
     */
    void logout();

    /**
     * 获取用户信息
     * @return
     */
    UserInfoResult userInfo();

    /**
     * 获取用户项目列表
     * @return
     */
    List<ProjectListResult> getProjectListByUserIdOrTeamId(GetProjectByTeamIdParam param);

}
